import http from "../../utils/index"


/**
 * 分页
 * @param data
 * @returns {*}
 */
export function pager(data = {}){
    return http.post("api/sys/dictionary/pager", data);
}

/**
 * 查找详细
 * @param id
 * @returns {*}
 */
export function details(id) {
    return http.get("api/sys/dictionary/details/"+id);
}

/**
 * 查找所有
 * @returns {*}
 */
export function allList() {
    return http.get("api/sys/dictionary/allList");
}

/**
 * 删除
 * @param ids
 * @returns {*}
 */
export function remove(ids) {
    return http.delete("api/sys/dictionary/remove/"+ids);
}

/**
 * 保存
 * @param data
 * @returns {*}
 */
export function save(data = {}) {
    return http.put("api/sys/dictionary/save", data);
}

/**
 * 根据字典类型查找字典信息
 * @param types
 * @returns {*}
 */
export function listByTypes(types) {
    return http.get("api/sys/dictionary/listByTypes/"+types)
}
